#ifndef POINT_3D_H
#define POINT_3D_H

#include "..\glm\glm.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>

class Point3D;

Point3D abs(Point3D p);

class Point3D
{
public:
	Point3D(void);
	Point3D(float x1, float y1, float z1);
	Point3D(glm::vec3 v1);
	Point3D(cv::Point3i p1);
	Point3D(cv::Point3d p1);
	~Point3D(void);
	float length();
	Point3D normalize();
	void scale(Point3D p);
	void scale(float p);

public:
	Point3D operator + (Point3D p1);
	Point3D operator - (Point3D p1);
	Point3D operator - ();
	Point3D operator * (float a1);
	Point3D operator / (float a1);
	Point3D operator = (Point3D p1);
	Point3D& operator += (Point3D p1);
	Point3D& operator -= (Point3D p1);
	Point3D& operator /= (float a1);
	bool operator == (Point3D p1);
	bool operator != (Point3D p1);
	Point3D crossProduct(Point3D p1);
	float dotProduct(Point3D p1);
	friend std::ostream & operator << (std::ostream &os, const Point3D &p1);  


public:
	float x;
	float y;
	float z;
};

#endif